package com.dollar.juc.dynamicThreadPool.alarm;

import com.dollar.juc.dynamicThreadPool.common.AlarmMessage;
import com.dollar.juc.dynamicThreadPool.util.JsonUtils;

import java.util.HashMap;
import java.util.Map;

public class ThreadPoolSmsAlarmNotify implements ThreadPoolAlarmNotify {
    @Override
    public void alarmNotify(AlarmMessage alarmMessage) {
        Map<String, String> data = new HashMap<>(2);
        data.put("alarmName", alarmMessage.getAlarmName());
        data.put("message", alarmMessage.getMessage());
        System.out.println("发送短信：" + JsonUtils.toJson(data));
    }
}
